package com.igeek.d0617;

import java.time.LocalDateTime;
import java.util.concurrent.CountDownLatch;

/**
 * @Author: zhiyu
 * @Date:16:53
 * @DESC:
 */
public class Test1 {
    public static void main(String[] args) {
        CountDownLatch countDownLatch = new CountDownLatch(1);
        try {
            Thread.sleep(3000);
            countDownLatch.countDown();
            countDownLatch.await();
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        for (int i = 0; i < 3; i++) {
            new Thread(()->{
                System.out.println(Thread.currentThread().getName()+":LocalDateTime.now() = " + LocalDateTime.now());
            },"线程"+i).start();
        }
    }
}
